package com.bootdo.hotel.dao;

import com.bootdo.hotel.domain.HotelEveryDayMoney;

import java.util.List;
import java.util.Map;

import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

/**
 * 房价码对应的每日价格
 * @author haojiangbo
 * @email 2100272728@qq.com
 * @date 2019-10-18 17:16:57
 */
@Mapper
public interface HotelEveryDayMoneyDao {

	HotelEveryDayMoney get(Long id);

	@Select("select code_id as codeId ,day , money  from me_hotel_every_day_money where code_id = #{codeId} and day = #{day}")
	HotelEveryDayMoney getByCodeIdAndDate(@Param("codeId")Long codeId,@Param("day")String day);

	/**
	 * 得到最小房价根据酒店Id和房型ID
	 * @param hotelId
	 * @param roomTypeId
	 * @return
	 */
	HotelEveryDayMoney getMinMoneyByHotelId(@Param("hotelId") Long hotelId,@Param("roomTypeId") Long roomTypeId);

	List<HotelEveryDayMoney> list(Map<String,Object> map);

	int count(Map<String,Object> map);
	
	int save(HotelEveryDayMoney hotelEveryDayMoney);
	
	int update(HotelEveryDayMoney hotelEveryDayMoney);
	
	int remove(Long id);
	
	int batchRemove(Long[] ids);
}
